package com.mi.proxy2;

public class Customer implements Buyer {

	private String name;
	private String addr;
	private CustomerProxy proxy;
	
	public Customer(String name, String addr) {
		super();
		this.name = name;
		this.addr = addr;
	}

	public String getName() {
		return name;
	}
	
	public String getAddr() {
		return addr;
	}
	

	public CustomerProxy getProxy() {
		return proxy;
	}
	
	public void setProxy(CustomerProxy proxy) {
		this.proxy = proxy;
		proxy.setCustomer(this);
	}

	@Override
	public void buy() {
		proxy.buy();
	}

}
